﻿<%@ Page Language="C#" AutoEventWireup="false" CodeFile="rptRegristrasiViewer.aspx.cs" Inherits="SIPO.Web.Reports.rptRegristrasiViewer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
    <link type="text/css" rel="stylesheet" href="<%= ResolveUrl("~/styles/ui.jqgrid.css") %>" />
    <script  src="<%= ResolveUrl("~/scripts/i18n/grid.locale-id.js") %>"type="text/javascript"></script>
    <script  src="<%= ResolveUrl("~/scripts/jquery.jqGrid.min.js") %>"type="text/javascript"></script>
    <script src="<%= ResolveUrl("~/scripts/helper.js") %>" type="text/javascript"></script>

   
    <script type="text/javascript">
        $(document).ready(function () {
            $("#btnpdf").button({ icons: { primary: "ui-icon-print"} });
//            $("#btnpdf").click(function () {
//                //var formUrl = '<%= ResolveUrl("~/reports/Transaction/rptPrintSanction.aspx") %>';


//                //window.open();

//            });

        });
    </script>

 <script type="text/javascript">

     var handlerUrl = '<%= ResolveUrl("~/Ajaxhandler/Transaction/recRegistrationhandler.ashx") %>';

     $('#tablel').jqGrid({
         url: handlerUrl + "?method=GetDataReport",
//         postData: {
//             PeriodeAwal: function () { return $("#hfPeriodeAwal").val() },
//             PeriodeAkhir: function () { return $("#hfPeriodeAkhir").val() },
//             Tahun: function () {return $("hfTahun").val() },
//             Sektor: function () { return $("#hfSektor").val() },
//             SubSektor: function () { return $("#hfSubSektor").val() },
//             SubSubSektor: function () { return $("#hfSubSubSektor").val() }
//         },
         datatype: 'json',
         colNames: ['Regristation ID', 'PreDebtorName', 'NPWP', 'Sektor', 'Sub Sektor', 'Sub Sub Sektor', 'Alamat 1', 'Alamat 2', 'Alamat 3', 'Wilayah', 'Kota', 'Kode Pos', 'Telp', 'Website'],
//         colModel: [
//           		{ name: 'RegristationID', index: 'RegristationID', align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
//                { name: 'PreDebtorName', index: 'DebtorName', align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
//                { name: 'NPWP', index: 'NPWP', align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
//                { name: 'recSector.SectorName', index: 'SectorName', align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
//                { name: 'recSubSector.SubSectorName', index: 'SubSectorName', align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
//                { name: 'Address1', index: 'Address1', align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
//                { name: 'Address2', index: 'Address2', align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
//                { name: 'Address3', index: 'Address3', align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
//                { name: 'recRegion.RegionName', index: 'RegionName', align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
//                { name: 'recCity.CityName', index: 'CityName', align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
//                { name: 'ZipCode', index: 'ZipCode', align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
//                { name: 'Phone', index: 'Phone', align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 00 },
//                { name: 'Website', index: 'Website', align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
//           	],
         colModel: [
           		{ align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
                { align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
                { align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
                { align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
                { align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
                { align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
                { align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
                { align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
                { align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
                { align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
                { align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
                { align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
                { align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 },
                { align: 'center', searchoptions: { sopt: ['eq', 'cn'] }, width: 100 }
           	],
         rowNum: 10,
         //id: 'RegristationID',
         multiselect: false,
         rowList: [5, 10, 15, 20],
         pager: '#pagerr',
         //sortname: 'recRegristation.RegristationID',
         sortorder: "asc",
         viewrecords: true,
         jsonReader: { repeatitems: false },
         width:1000,
         height: '100%',
         caption: 'Regristrasi'
         //ajaxGridOptions: { cache: false }

     });

     $("#tablel").jqGrid('navGrid', '#pagerr', { edit: false, add: false, del: false, refreshtext: 'Refresh' },
        {}, {}, {}, { closeOnEscape: true, multipleSearch: false, closeAfterSearch: false });
   </script>

<body>
    <form id="form1" runat="server">
    <div id="dialogg" title="Default dialog">
        <asp:Button ID="btnpdf" runat="server" Text="PDF" />
    </div>
    

    <table id="tablel" class="scroll" cellpadding="0" cellspacing="0">
    </table>
    <div id="pagerr" class="scroll">
    </div>
    
    <br />
    
    <asp:HiddenField ID="hfPeriodeAwal" runat="server" />
    <asp:HiddenField ID="hfPeriodeAkhir" runat="server" />
    <asp:HiddenField ID="hfTahun" runat="server" />
    <asp:HiddenField ID="hfSektor" runat="server" />
    <asp:HiddenField ID="hfSubSektor" runat="server" />
    <asp:HiddenField ID="hfSubSubSektor" runat="server" />
    <br />
    </form>
</body>
</html>
